import axiosConfig from "../axios/axiosConfig"

function login(data) {
    return axiosConfig({
        url: "/common/login",
        method: "post",
        data
    })
}

function register(data) {
    return axiosConfig({
        url: "/common/register",
        method: "post",
        data
    })
}

function logout() {
    return axiosConfig({
        url: "/common/logout",
        method: "post"
    })
}

function updateUser(data) {
    return axiosConfig({
        url: "/common/update",
        method: "post",
        data
    })
}

function getUserList(data) {
    return axiosConfig({
        url: "/adminUser/getAllUsers",
        method: "post",
        data
    })
}

function deleteUser(data) {
    return axiosConfig({
        url: "/adminUser/deleteUser",
        method: "post",
        data
    })
}

function adminUpdateUser(data) {
    return axiosConfig({
        url: "/adminUser/updateUser",
        method: "post",
        data
    })
}

export default {
    login,
    register,
    logout,
    updateUser,
    getUserList,
    deleteUser,
    adminUpdateUser
}